package model;

/**
 * JsfTimeId entity. @author MyEclipse Persistence Tools
 */

public class JsfTimeId implements java.io.Serializable {

	// Fields

	private JsfClassroom jsfClassroom;
	private Integer classId;

	// Constructors

	/** default constructor */
	public JsfTimeId() {
	}

	/** full constructor */
	public JsfTimeId(JsfClassroom jsfClassroom, Integer classId) {
		this.jsfClassroom = jsfClassroom;
		this.classId = classId;
	}

	// Property accessors

	public JsfClassroom getJsfClassroom() {
		return this.jsfClassroom;
	}

	public void setJsfClassroom(JsfClassroom jsfClassroom) {
		this.jsfClassroom = jsfClassroom;
	}

	public Integer getClassId() {
		return this.classId;
	}

	public void setClassId(Integer classId) {
		this.classId = classId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof JsfTimeId))
			return false;
		JsfTimeId castOther = (JsfTimeId) other;

		return ((this.getJsfClassroom() == castOther.getJsfClassroom()) || (this
				.getJsfClassroom() != null
				&& castOther.getJsfClassroom() != null && this
				.getJsfClassroom().equals(castOther.getJsfClassroom())))
				&& ((this.getClassId() == castOther.getClassId()) || (this
						.getClassId() != null && castOther.getClassId() != null && this
						.getClassId().equals(castOther.getClassId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getJsfClassroom() == null ? 0 : this.getJsfClassroom()
						.hashCode());
		result = 37 * result
				+ (getClassId() == null ? 0 : this.getClassId().hashCode());
		return result;
	}

}